import java.util.Scanner;

public class SwitchDemo07 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int x = scanner.nextInt();
        System.out.println("请输入有一个运算符");
        String op = scanner.next();
        System.out.println("请输入一个整数");
        int y = scanner.nextInt();
        switch (op) {
            case "+":
                System.out.println(x + op + y + "=" + (x + y));
                break;
            case "-":
                System.out.println(x + op + y + "=" + (x - y));
                break;
            case "*":
                System.out.println(x + op + y + "=" + (x * y));
                break;
            case "/":
                if (y != 0) {
                    System.out.println(x + op + y + "=" + (x / y));
                } else {
                    System.out.println("除数不能为0");
                }

                break;
            default:
                System.out.println("非法运算符");
        }

    }
}
